<template>
  <div>
    <!-- TypeNav三级联动为全局组件, 无需引入直接使用 -->
    <TypeNav />
    <ListContainer />
    <Recommend />
    <Rank />
    <Like />
    <Floor v-for="item in floorList" :key="item.id" :floorItem="item" />
    <Brand />
  </div>
</template>

<script>
  import ListContainer from './ListContainer/index.vue';
  import Recommend from './Recommend/index.vue';
  import Rank from './Rank/index.vue';
  import Like from './Like/index.vue';
  import Floor from './Floor/index.vue';
  import Brand from './Brand/index.vue';

  import { mapState } from 'vuex';
  export default {
    name: 'Home',
    mounted() {
      this.$store.dispatch('home/floorList');
    },
    computed: {
      ...mapState('home', ['floorList']),
    },
    components: {
      ListContainer,
      Recommend,
      Rank,
      Like,
      Floor,
      Brand,
    },
  };
</script>

<style scoped></style>
